package com.share.admin.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.share.admin.model.db.Menu;
import com.share.admin.model.vo.MenuPageReq;
import com.share.admin.model.vo.MenuVo;
import com.share.common.common.Page;

import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author author
 * @since 2022-09-22
 */
public interface IMenuService extends IService<Menu> {
    //角色对应的菜单
    Set<Menu> listByRoleId(Long roleId);

    //页面展示菜单展示
    Set<Menu> listByUserId(Long userId);
    Set<Menu> listAll();

    //页面展示
    Set<MenuVo> treeByUserId(Long userId);
    Set<MenuVo> treeAll();


    //页面查询的权限
    Set<String> permissionByMenuId(Long menuId);
    Set<String> permissionByMenuIdAndUserId(Long menuId, Long userId);


    //接口校验权限
    Set<String> permissionByUserId(Long userId);
    Set<String> permissionAll();

    Page pageList(MenuPageReq req);
}
